1. Field of the Invention
The present invention relates to a numerical control apparatus for controlling a machine tool in accordance with a machining program and relates to an automatic programming apparatus for making the machining program.
2. Description of the Related Art
Various techniques have been developed for securing the accuracy of a tool path for a machine tool to be driven at a high speed. Among these techniques, there is one for decreasing a moving speed of the tool so as to limit a degree of an acceleration thereof.
When a tool of a machine tool moves along a path at a high speed, a drive unit for driving the machine tool is required to output higher power at a position where the path is suddenly turned. The output of high power by the drive unit gives an impact on the machine tool, causing an error in machining shape. In order to avoid this error, in case where a path is suddenly turned or a path is along a circular arc having a small diameter, velocity is decreased so that variation in speed of individual axes will not exceed a certain level, that is, acceleration will not exceed an allowable value. As mentioned above, such acceleration is decreased by decreasing a velocity in accordance with the variation in a curvature of the path.
However, in the case of a machine tool having a specially high machining speed, such as a laser machining device, it is desirable to improve the accuracy of a shape of the tool path while maintaining a machining speed at a high velocity. To this end, a method has been proposed in which a tool path is formed to be as smooth as possible, thereby preventing an abrupt change in velocity and enabling machining to be performed at a high speed and a high accuracy.
In the above way, though the magnitude of acceleration can be decreased by making the tool path smooth and by reducing the speed in the section having a small radius of curvature; an abrupt change in acceleration cannot necessarily be prevented. For example, when a tool moves from a first circular path to a second circular path, there may be a case where the turning direction of the second circular path is inverted. FIG. 7 shows an example of a moving path in which acceleration varies largely. In this figure, the moving path is changed from a circular arc 51 providing a counterclockwise path to a circular arc 52 providing a clockwise path. The first circular arc 51 has a center O.sub.1 and a radius r. The second circular arc 52 has a center O.sub.2 and a radius r. A transition point (a joint in circular arcs) from the first circular arc 51 to the second circular arc 52 is a point P, and the path is kept smooth even in a section including the point P.
In this case, an acceleration vector a.sub.1 at an end point of the first circular arc 51 points to a negative direction of an X axis, while an acceleration vector a.sub.2 at a beginning point of the second circular arc 52 points to a positive direction of the X axis. That is, at the point P where the path changes from the circular arc 51 to the circular arc 52, the direction of the acceleration in the X axis changes 180 degrees. Accordingly, even when the degree of the acceleration is within an allowable range, the acceleration suddenly changes due to the inversion of the acceleration direction.
Such abrupt change in acceleration causes the machine to act to reverse the drive power of the motor, giving a great impact on the machine. Such an impact will adversely affect the accuracy in machining. Thus, such an abrupt change in the acceleration has to be avoided as far as possible.
However, since conventional apparatuses are not provided with means for reducing an abrupt change in acceleration at a joint in circular arcs, a great impact force is given on a machine tool operating at a high machining speed such as a laser machining device, with the result that a machining at a high-speed and with high-accuracy can not easily be realized.